
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>修改</title>

</head>
<body>
<form action="student" method="post" enctype="multipart/form-data">
    <table border="1" align="center" cellspacing="0"width="500px" cellpadding="10">
        <caption><h2>修改学员</h2></caption>
        <tr>
            <td align="center">姓名:</td>
            <td>
                <input type="text" name="sname" value="${student.sname}">
                <!--                给后台服务器传递一个可执行的方法名-->
                <input type="hidden" name="method" value="updateStudent">
                <input type="hidden" name="sid" value="${student.sid}">
            </td>
        </tr>
        <tr>
            <td align="center">年龄:</td>
            <td><input type="text" name="age" value="${student.age}"></td>
        </tr>
        <tr>
            <td align="center">性别:</td>
            <td>
                <input type="radio" name="sex" value="男" <c:if test="${student.sex eq '男'}">checked="checked"</c:if>>男
                <input type="radio" name="sex" value="女" <c:if test="${student.sex eq '女'}">checked="checked"</c:if>>女
            </td>
        </tr>
        <tr>
            <td>头像</td>
            <td>
                <input type="file" name="pic">
                <%--保存用户的旧头像--%>
                <input type="hidden" name="oldpic" value="${student.pic}">
                <img src="http://localhost:8080/pic/${student.pic}" width="40px" height="40px">
            </td>
        </tr>

        <tr>
            <td align="center">学历:</td>
            <td>
                <select name="degree">
                    <option value="专科" <c:if test="${student.degree eq '专科'}">selected="selected"</c:if>>专科</option>
                    <option value="本科" <c:if test="${student.degree eq '本科'}">selected="selected"</c:if>>本科</option>
                    <option value="硕士" <c:if test="${student.degree eq '硕士'}">selected="selected"</c:if>>硕士</option>
                    <option value="博士" <c:if test="${student.degree eq '博士'}">selected="selected"</c:if>>博士</option>
                </select>
            </td>
        </tr>
        <tr>
            <td align="center">邮箱:</td>
            <td><input type="text" name="email" value="${student.email}"></td>
        </tr>
        <tr>
            <td align="center">备注:</td>
            <td><textarea name="mark">${student.mark}</textarea></td>
        </tr>
        <tr>
            <td colspan="2" align="center">
                <input type="submit" name="regist" value="保存">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <input type="button" name="btn" onclick="history.back()"value="返回">
            </td>
        </tr>
    </table>
</form>
</body>
</html>